package org.jpro.exception;

import java.text.MessageFormat;

/**
 * <P>功能描述 : 系统业务异常 </P>
 * <P>File name : BusinessException </P>
 * <P>Author : 王泽浩 </P>
 * <P>E-Mail : 1028625100@qq.com </P>
 * <P>Date : 2017/1/1 上午12:23</P>
 */
public class BusinessException extends BaseException {
    private static final long serialVersionUID = -7005560974235793066L;

    /**
     * 构造函数
     * @param code
     */
    public BusinessException(ExceptionCode code) {
        super(code);
    }

    /**
     * 自定msg构造
     * @param code
     * @param params
     */
    public BusinessException(ExceptionCode code, Object... params) {
        super(code, MessageFormat.format(code.getMsg(), params));
    }
}
